OPC Studio User's Guide and Reference
Mapping Your Objects
Concepts > OPC Data Client Concepts > OPC Data Client Development Models > Live Mapping Model > Live Mapping Model for OPC Data (Classic and UA) > The Mapper Object > Mapping Your Objects

In order to create the mappings, i.e. associations between mapping sources (OPC data) and mapping targets (your object members), you typically call one of the Map method overrides on the mapper object (DAClientMapper, for OPC Data Access).

For the mapping, you can either have the mapper use a copy of its mapping context template (defined by its MappingContextTemplate property), or pass in your own Mapping Context object (see further below for details of the mapping context). In both cases, you need to specify the object to be mapped. The mapper then uses its knowledge about the object type (as given by the mapping attributes) to create and add to itself a set of mappings, one mapping for each mapped member in your object structure.

It is also possible to “undo” the mapping. To do so, you typically call one of the Unmap method overrides on the mapper object (DAClientMapper, for OPC Data Access). You can either un-map all mappings that currently exist in the mapper (if you pass no arguments), or un-map specific mappings.

See Also